<template>
  <button @click="counterStore.increment">{{ counterStore.count }}</button>
  {{ counterStore.doubleCount }}
  
</template>

<script setup>
// 1.导入use打头的方法
import { onMounted } from 'vue'
import { useCounterStore } from './stores/counter'
// 2.执行方法得到store实例
const counterStore = useCounterStore()
console.log(counterStore)

onMounted(() => {
  counterStore.getList()
})

 
</script>

<style  lang="scss" scoped>
</style>